home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / CMPLTPAS / SHOWEVAR.PAS < prev    next >
Pascal/Delphi Source File  |  1988-09-06  |  341b  |  17 lines

  1. PROGRAM ShowEnvironmentVariable;
  2.  
  3. USES DOS;
  4.  
  5. VAR
  6.   Name,Value : String;
  7.  
  8. BEGIN
  9.   Write('Enter the name of an environment variable: ');
  10.   Readln(Name);
  11.   Value := GetEnv(Name);
  12.   IF Length(Value) = 0 THEN
  13.     Writeln('That variable is not in the environment.')
  14.   ELSE
  15.     Writeln('The value of ',Name,' is ',Value,'.');
  16. END.
  17.